package com.hdhere.domain.common.util;

import com.hdhere.domain.UserInfo;
import com.hdhere.domain.common.setting.Consts;
import org.apache.shiro.SecurityUtils;

/**
 * Created by dus on 2018/12/15.
 */
public class LoginUtils {

    public static UserInfo getLoginUser(){
        UserInfo userInfo = null;
        try{
            userInfo = (UserInfo) SecurityUtils.getSubject().getSession().getAttribute(Consts.LOGIN_USER);
        }catch (Exception e){

        }
        return userInfo;
    }
}
